package com.atguigu.springcloud.alibaba.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.atguigu.springcloud.alibaba.myhandler.CustomerBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

/**
 * 用于自定义限流规则
 */
@RestController
public class CustomerController {


    @GetMapping("/handler01")
    @SentinelResource(value = "hand01",blockHandlerClass = CustomerBlockHandler.class,blockHandler = "handler02")
    public String customer01() {
        return "用于自定义限流custom01";

    }
}
